<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
    <head>
        <th:block th:include="include :: header('新增菜单')" />
    </head>
    <body class="white-bg">
        <div class="wrapper wrapper-content animated fadeInRight ibox-content">
            <form class="form-horizontal m" id="form-menu-add" th:object="${menu}" >
                <input name="menuId"   type="hidden" th:field="*{menuId}"   />
                <div class="form-group">
                    <label class="col-sm-3 control-label ">上级菜单：</label>
                        <div class="col-sm-8">
                            <input class="form-control" type="text" name="parentId"   th:value="*{parentId}"   th:field="*{pmenuName}" id="parentId" readonly>
                        </div>
                </div>




                <div class="form-group">
                    <label class="col-sm-3 control-label">菜单类型：</label>
                    <div class="col-sm-8">
                        <input   class="form-control" type="text" name="menuType"  id="menuType" th:field="*{menuType}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">菜单名称：</label>
                    <div class="col-sm-8">
                        <input   class="form-control" type="text" name="menuName"   id="menuName" th:field="*{menuName}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">请求地址：</label>
                    <div class="col-sm-8">
                        <input   class="form-control" type="text" name="url"  id="url" th:field="*{url}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">权限标识：</label>
                    <div class="col-sm-8">
                        <input   class="form-control" type="text" name="perms"  id="perms" th:field="*{perms}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">显示排序：</label>
                    <div class="col-sm-8">
                        <input   class="form-control" type="text" name="orderNum"  id="orderNum" th:field="*{orderNum}" />

                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label">菜单状态：</label>
                    <div class="col-sm-8">
                        <div class="radio-box" th:each="dict : ${@dict.getType('sys_show_hide')}">
                            <input type="radio" th:id="${dict.dictCode}" name="visible" th:value="${dict.dictValue}" th:field="*{visible}">
                            <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <th:block th:include="include :: footer" />
        <script>
            var prefix = ctx + "cms/menu";



            function submitHandler() {

                $.operate.save(prefix + "/update", $('#form-menu-add').serialize());

            }




        </script>
    </body>
</html>
